<title>运输情况分析</title>

<div class="page animation-fade">
    <div class="page-header page-header-bordered">
        <h1 class="page-title">运输情况分析</h1>
        <div class="page-header-actions input-group">
            <select  id="branch_center" name="branch_center" data-plugin="select2"
                    style="width: 150px;">
                <option value="">配送中心</option>
                #foreach( $branchCenter in $branchCenterList )
                <option value="${branchCenter}">${branchCenter}</option>
                #end
            </select>
            <select  id="primary_sale" name="primary_sale" data-plugin="select2"
                    style="width: 150px;">


            </select>
        </div>
    </div>
    #parse("/common/loading.html")
    <div class="page-content">
        <div class="row">
            <div class=" col-md-6" >
                <div class="panel panel-bordered">
                    <div class="panel-heading">
                        <h3 class="panel-title">各月份到工厂提货延误程度</h3>
                        <div class="panel-actions">

                        </div>
                    </div>
                    <div class="panel-body padding-3 height-450" style="width:100%;height:670px;">
                        #parse("/lpp/network/supply/transport/bar4.html")
                    </div>
                </div>
            </div>

            <div class=" col-md-3">
                <div class="panel panel-bordered">
                    <div class="panel-heading">
                        <h3 class="panel-title">各月份车辆运输延误程度</h3>
                        <div class="panel-actions">
                        </div>
                    </div>
                    <div class="panel-body padding-3 height-300" style="width:100%">
                         #parse("/lpp/network/supply/transport/bar1.html")
                    </div>
                </div>
            </div>
            <div class=" col-md-3">
                <div class="panel panel-bordered">
                    <div class="panel-heading">
                        <h3 class="panel-title">各月份车辆运输延误次数</h3>
                        <div class="panel-actions">

                        </div>
                    </div>
                    <div class="panel-body padding-3 height-300" style="width:100%">
                        #parse("/lpp/network/supply/transport/bar2.html")
                    </div>
                </div>
            </div>
            <div class=" col-md-3">
                <div class="panel panel-bordered">
                    <div class="panel-heading">
                        <h3 class="panel-title">各月份车辆运输准点次数</h3>
                        <div class="panel-actions">

                        </div>
                    </div>
                    <div class="panel-body padding-3 height-300" style="width:100%">
                        #parse("/lpp/network/supply/transport/bar3.html")
                    </div>
                </div>
            </div>

            <div class=" col-md-3">
                <div class="panel panel-bordered">
                    <div class="panel-heading">
                        <h3 class="panel-title">各月份到货延误程度</h3>
                        <div class="panel-actions">

                        </div>
                    </div>
                    <div class="panel-body padding-3 height-300" style="width:100%">
                        #parse("/lpp/network/supply/transport/bar5.html")
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/static/public/vendor/matchheight/jquery.matchHeight.min.js"></script>
<script type="text/javascript">
    $(function () {
        loadbar1("","");
        loadbar2("","");
        loadbar3("","");
        loadbar4("","");
        loadbar5("","");
        $("#branch_center").bind("change", function () {
            var center = $("#branch_center").val();
            loadbar1(center,"");
            loadbar2(center,"");
            loadbar3(center,"");
            loadbar4(center,"");
            loadbar5(center,"");
            setoption1();
        });
        $("#primary_sale").bind("change", function () {
            var center = $("#branch_center").val();
            var primarySales = $("#primary_sale").val();
            loadbar1(center,primarySales);
            loadbar2(center,primarySales);
            loadbar3(center,primarySales);
            loadbar4(center,primarySales);
            loadbar5(center,primarySales);
        });
    });
    function setoption1() {
        var center=$("#branch_center").val();
        $.ajax({
            url: "#springUrl('/network/supply/transport/option')",
            data: {"center": center},
            type: "POST",
            success: function (text) {
                var d = JSON.parse(text);
                if (d.success && d.data) {
                    $("#primary_sale").empty();
                    var options="<option value=''>"+"请选择销售渠道"+"</option>";
                    $("#primary_sale").append(options);
                    for(var i=0;i<d.data.option.length;i++){
                        var primarySales=d.data.option[i].primarySales;
                        var options="<option value='"+primarySales+"'>"+primarySales+"</option>";
                        $("#primary_sale").append(options);
                    }
                }
            }
        })
    }
</script>